﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
public partial class User_CT_CTtinhnang : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
       Dal_parent.DataSource = ThuocTinhBLL.LayNhomThuocTinh(1);
        Dal_parent.DataBind();

    }
    protected void Dal_parent_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        HiddenField hrId = (HiddenField)e.Item.FindControl("hrID1");
        DataList dv = (DataList)e.Item.FindControl("Dtl_child");

        if (dv != null && hrId != null)
        {
            int ma = Convert.ToInt32(hrId.Value);
            dv.DataSource = ThuocTinhBLL.LayChiTieThuocTinhSP(ma, 1);
            dv.DataBind();
        }
    }
}